/*
 * @Author: tkp
 * @Date: 2025-01-03 16:24:13
 */
import { authModuleAdd, authModuleQuery, authModuleModify, authModuleDel, authSystemQuery, } from '@/utils/api'
export class IndexBloc {
    queryForm = {
        moduleName: '',
        systemId: '',
    }
    pageNum = 1
    pageSize = 50
    total = 0
    addPop = false
    rowItem = ''
    editPop = false
    sysTeamType = []
    tableOption = [
        { label: '模块ID', prop: 'moduleId', },
        { label: '模块名称', prop: 'moduleName', },
        { label: '所属系统', prop: 'systemId', slot: 'systemId' },
    ]
    tableData = []
    load(data) {
        authModuleQuery(data).then(res => {
            this.tableData = res.data
        })
    }
    modify(data) {
        return authModuleModify(data)
    }
    add(data) {
        return authModuleAdd(data)
    }
    del(data) {
        return authModuleDel(data)
    }
    loadSystem() {
        let param = {
            enable: 1
        }
        authSystemQuery(param).then(res => {
            this.sysTeamType = res.data || []
        })
    }
}